package datetest;

import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

public class TestCalendar {
    public static void main(String[] args) {
        Calendar calendar=new GregorianCalendar();//
        calendar.set(2001,Calendar.JANUARY,10,12,23,34);
        Date d=calendar.getTime();
        System.out.println(d);
        calendar.add(Calendar.YEAR,30);
        System.out.println(calendar);
    }
}
